<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initAppAutoload() {		
		$moduleLoader = new Zend_Application_Module_Autoloader(array(
			'namespace' => '',
			'basePath' => APPLICATION_PATH));
		
		return $moduleLoader;
	}

    protected function _initView()
    {
		$theme = 'default';
		$templatePath  = APPLICATION_PATH . '/../public/themes/' . $theme . '/templates';
		
		$layout = Zend_Layout::startMvc()->setLayout ('layout' )->setLayoutPath ($templatePath )->setContentKey ('content');
		
		$view = new Zend_View();
		$view->setBasePath ($templatePath );		
		$view->setScriptPath (APPLICATION_PATH );
		$view->addHelperPath ('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper' );
		
		$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
		$viewRenderer->setView ($view);

		Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
        return $this;
    }
}

